<?php if ( ! defined('WDK_PATH')) exit('No direct script access allowed');?>
<!--{**************************************************************************}-->
<style>
.box					{width:500px;margin-bottom: 20px;height:160px;}
.box .title				{border-bottom:3px double #D9D9D9;}
.box h1					{margin:8px;color:#DC4616;}
.box span.more			{float:right;font-size: 11px;}
.box ul					{list-style: none;margin: 5px;padding: 0px;}
.box ul li				{padding:7px 0px;border-bottom: 1px solid #DDD;}
.box ul li span.cate	{font-size:11px;color:#DC724E;margin-right:5px;}
.box ul li span.cmt		{color:#DC4616;font-size:11px;margin-left:5px;font-weight: bold;}
.box ul li span.date	{float:right;}
.fcr	{float:right;clear:right;}
.fcl	{float:left;clear:left;}
.clear	{clear:both;}
</style>
<!--{**************************************************************************}-->
<table id="listTable" class="list">
	<caption>
		<div class="fl">
			총 <span id="total">0</span>개의 게시물이 검색되었습니다.
		</div>
	</caption>
	<colgroup>
		<col style="width:60px;"/>
		<col style="width:120px;"/>
		<col style="width:*;"/>
		<col style="width:120px;"/>
		<col style="width:60px;"/>
		<col style="width:80px;"/>
	</colgroup>
	<thead>
		<tr>
			<th>No</th>
			<th>게시판</th>
			<th>제목</th>
			<th>작성자</th>
			<th>조회수</th>
			<th>등록일</th>
		</tr>
	</thead>
	<tbody data='{json}'></tbody>
	<tfoot>
		<tr>
			<td colspan="8">
				<div id="pagebar" class="fr"></div>
			</td>
		</tr>
	</tfoot>
</table>
{# plugin listmanager #}
<!--{**************************************************************************}-->
<script>
(function($){
	WdListManager.prototype.empty = function(json)
	{
		return '검색 결과가 없습니다.';
	};
	WdListManager.prototype.draw = function(json)
	{
		var comment = '';
		if(json.comment_num > 0)
		{
			comment = ' <span class="cmt">['+json.comment_num+']</span>';
		}
		var tag = [];
		var url = '/post/view/'+json.bbs_id+'/'+json.seq;
		tag.push('<td class="tc">'+json.no+'</td>');
		tag.push('<td class="tc">'+json.bbs_name+'</td>');
		tag.push('<td class="">&nbsp;&nbsp;<a href="'+url+'" target="_blank">'+json.title+'</a>'+comment+'</td>');
		tag.push('<td class="tc"><a class="userinfo" uli="'+json.user_login_id+'">'+json.user_nick+'</a></td>');
		tag.push('<td class="tc">'+json.hits+'</td>');
		tag.push('<td class="tc">'+json.insert_time+'</td>');
		return tag.join("");
	};
	WdListManager.prototype.draw_event = function()
	{
		$(this.root+'>tbody>tr').map(function(){
			var self = $(this);
		});
	};
	$(document).ready(function(){
		wlm = new WdListManager($PATH);
		wlm.set_root('#listTable');
		wlm.set_totalbox('#listTable #total');
		wlm.set_pagebar('#listTable #pagebar');
		wlm.set_param('keyword', $('form[name=g_search] :text').val());
		wlm.preload();
	});
})(jQuery);
</script>
<!--{**************************************************************************}-->